update square example