minor fixes
added test cases