adding where clause functionality