implement method2 and onclick