adding debug_function.R