Get queries to work (roughly)