add withManager function

see issue #20

i have not gone the `MonadIO` way because it did not fit the overall theme.