improved queries

Still not working, however...