wip
added logging