refactoring to reuse selectors