Modified in removeAllBy  functions