Added encapsulate example

Improve documentation within examples