proper r-tree

you can totally help with this @latentflip