adding capacity to debug_function.R