simplification of code, case 5 6 are the same
corrected Error statements