added a function to find bounding box of pointsets