Updated squaring.py to conform to new API.