updated max principle check, changed Qplus, Qminus