added error condition