checking code and streamlining the trend calcs a bit - no changes to final data