added rudimentary logging