update tendency calc function.