Made changes to allow for WHERE clause behavior