Modified the makeTrigramList function