updating query