add words frequency algorithm
fix merge conflict