created class for debugging and a debug method