improved logic for mutation and deletion