add method to save the QPs.