update square_perimeter to use type annotation