calling method in different ways