added quadtree for collision detection