use common functions to keep track of the versions being used
remove white spaces, AND use itertools for generator