remove identities function