* adding diagnostics
* restructuring