separted js into flow.js