renamed and refactored templates