more tests, fixed typo in code