add error routine. do timing errors here.