add tests to some corner cases
add tests for more corner cases