rewrite app to use only arrow interface
add monad test
formatting