modified teardown method