modify controller's  render method