added error method.