replace deprecated direct_to_template with render

fixes #174