removed elements function