update next query