refactoring <select>