Moved creation of 'oncvar_periods' to a different file, for ease of use.
wrote a functional version of how many periods are new