fixes #10 - went with more compact code instead of suggested
Minified for 0.7.1