added encapsulation demo