Customize code of history view