changed main method