added test case and documentation