some work on debug