query/update api working