Fix the case if there's only one letter occuring in the given text
Add spec tests for edge cases