DOC: cookbook examples courtesy of @timmie