sample code of walking a 2-d matrix via spiraling inward