remove minified script
fix bug from variable scope
add demo