minor changes and test cases