refactoring share templates to remove duplicates