add some basic logging and tests