written changes to add select; still not working