removeByIdsRange implementation