added rudimentary logging functionality