Could we make this code simpler by having the primary vector be numbers from 1-length.