Refactor into a single resolving method