refactoring gosip