refactoring of Method signature generation