changed map to mapPromise & mapValue to map