refactor script and rebuild
Merge branch 'develop'