add an error checking example