added logging
a bit trial and error