work in progress: trying to implement a debugger