use log function as first class object