added most of the constraints