tearDown() function modified