error checking is done