fixed bug in example; added failure notification