encapsulate a method