remove by object instead of index