working for methods with different number of arguments