moved main method