switched results to a map<string, size_t> for faster sort times and also correct string comparison to prevent duplicates