minor cleanup of old debug function