demo and perm_missing_elem solutions