added diagnostics. wip