Cross posted at Re: executing a method in main class