added a new test case and some functionality