fixed hanging tests, addressed Ted's comments