changed whole encapsulation