wow i never thought it was done with binary space partitioning tree.... :)