updated original method and recursive method with the shifting.  still
need to make sure the avg has enough points below it when calcing shift