added debug support