smart IO monad usage