getting json queries working