implemented where clausures in select