first pass, non-periodic case, new way