done with switch over to errors dict

I have not tested all the code switches