removed old code
added a test case