Modify wrapStr to use bounding box