fix problem with encapsulation