* refactor of diagnostic