added a helper debug method