refactor select element