minor modification for map method