Added serialize example

Also, fixed minor typo.