added test cases and output