improved encapsulation