fixed setting up the next test
cleaned some code