Update capture_functions.R