added trend data plus skeleton of func