finalize hitsory api demo