script to calculate rolling stats on a column. this version's buggy, but want to backup