Adding convert string to method name, refactoring existing code