refactoring constraints registration
fixes when all digits equals
Changed to version 0.3