add script to create dynamic caption width