refactor using js closure
Merge pull request #1 from jimmytidey/using_closure

refactor using js closure