test case for remove function