simplified sharing and refactoring