added constrain solver