Fixing bug in calculation of frequency array
Fixing big in word cloud creation due to not using already written function