refactor selectfield