Added the select function