first working version with reactive UI controls and and outputs
some cargo cult code removed