Renamed functions, created function to check all constraints