refactor: extracted method