refactor messy select view