added error method