add square procedure