adding logging to more stuff