added error support