encapsulate arg process function