removed some legacy code
updated the test case