Added "onCallback" function for queries.