updated render_template return value and updated index view