more test cases
cleanup, refactor