added missing debug function