modify code for select - had to reason my way through it