added functions to calculate the percentage of letters or words, i will use the percentage for the visualisations