added error state