- more cleaned up template codes