further internal error checking