added most/least, added resets, added morphology, made problem more convex