Legendre and Shanks done