initial working version, also with first jasmine tests