minor changes, max to infinity, more bounding box