Change the spiral algorithm