add delete method and a simple test case
there is a bug here, but i cant find what's happening