added two test cases
bug fixes