added map<string, double>, fixed bug