adding test case to function