adding log function: