implement remove operation, but have some serious bugs.