early working version; added termbox debug frontend