improved several tests, all tests pass