allows user to specify number of generations as third argv