permut and segments added