moving debug methods out into helper file