added compute AABB function.