add more tests, fixes