makeSquare function