after-fn for rendering template