template restructure for messaging