monadic IO with scala