refactored common templates