trivial refactor: add helper method