added Jasmine tests
minor tweaking