added function to build select boxes