Working version of new sequence averaging method