refactoring and method lookup improvement