Code is heaps faster - removed pow(dr,3)
Merging.