debug procedure