trying to optimize DOF constraints