added number of history points as a command line argument