moved event delegation to DOM
Merge pull request #17 from khan4019/master

moved event delegation to DOM