refactor to selector interface