fix worflow class encapsulation