added karma and mocks for unit testing