adding example and sanity check code