new render function

use a render function with a custom template