fix .remove() and add test