adding the logging functions