write original debugging func