changed to render_to_string