Refactor into method