fixed error in logging
added test 2