refactored model select