added karma tests