added logging functionality (WIP)