2-opt algorithm works, now much faster with caching