Generalize signature to MonadIO