added another ref to perm mapping algo