Method now returns the correct where clause