select function restored