Added where clauses in getWhereClauses()