added generator and all functions for flow creator