added encapsulation example