working on adding logging