introduce a log() function