refactor: extract method