add try_with

Partially addresses #3.