Oops! Sorry about the poor quality of my code, I'm more used to coffee-script and not so much used to contribute to open source project!