first BVH implementation