better examples, error checking and gracious failing