ISSUE-26/SOLUTION-17: incorrect algorithm in isSquare() replaced