implemented the select functionality