made the debug function public