added new layout; new template system