converted history to a script