map() and log() functionality