dog in query now works properly