added formatter functions to template processing