added repeat to square example