finished error check

see above!