working on fixing the encapsulation