update trend code