impl of debug funct