time debug added

-type casting syntax fix in allstates for saturation

-error message added to timeCheck if loop is too slow