changed to standard form, added constraints