working with encapsulation