Adds logic to handle creating a select