Refactor: extract method