getSquare method added.