changed input to be just number of factors