finished error checking