fixed some errors in how constraints are applied and evaluated, but there are still errors, incorrect values still slip through the checks