refactor scripts
fix code style