update the function to read bounding box