add a debug functions