formatting and spacing with template