added karma + sample unit tests