refactor vectors, massfuncs, and gambles again