use an argument to determine the number of epochs