added internal functions - for the map() function.