Added the add_caption_function option