added some more functions in method2