bug in encapsulation