added wip test cases, fixes