Working K-D Tree summation