first working version - console UI only