add debug function and time functions to public methods