encapsulation of logic