scripts encapsulation