added a new log function