added karma and jasmine unit testing