add some tests
fix jshints