added bounding box computation