removed recursion from sonstraint system