add cache for simplify operation of constraints. testing