refactored tests
added a test case