c encapsulation