refactoring jasmine