selector refactor