added tear down function