some changes to handle the selects