move main method to bottom of source file