improved "remove" method
test case for new remove method