add debugger, somewhat working now