Adding bounding box computation, fix #2