Added modified example from O'Reilly Book

It's got an add method