wrote tests for select method
created a select method