modified in removeAllBy function