adding error checking to the underlying language