add debug method