reorganized and changed template format