adding squares code