added templates for common code