moved code to use the new log helpers