added error tests