added error for arrays