best speed up yet!

optimization for this algorithm is pretty much done. to further
optimize, change algorithm