update q and req