add curve bounding box, format code