modified encapsulation code position