refactor sharing feature