removed some unused librarys
sorting out select function