added diagnostic messages