Main method2