new method checkRuleSquare implemented
new method checkRuleSquare implemented