adding some logging and tests

added another unit test and some additional logging