add init sub via function call or YAML config