implemented dictionaryByOccurrences
fixed warning