change parse query into promises