[wip] bugs and logging