chnages in encapsulation.js