encapsulate example shows how to implement defaults too