a fix about let notation
modified map function