minor refactoring on resolver