added logging

wow, this stuff is pretty cool!