fixed issue with encapsulation