refactor flow structure
fix R code for prediction