continuing to test create_constraint, fixed some more stuff in apply_constraint