I don't think there's a need to have two separate, nearly identical functions. I'll remove this one and modify `calculate-trends`.