now have select function in place