make it possible to pass in args to renderWithTemplate