fixed most of the tests