prepares for end of QP