changed routing to handle selects