callback for add_path