changes related to #13 more test cases will be appreciated