optimised code a bit, saved 1.8 secs or so on 63x63, still not very documented