added debug method