refactor share