add feature: require
remove function scope
fix indent