added where situation for select method