refactoring part 2; removed intermediate string -> method maps