updating to add more options and adding calls to Dispose()