step2: init degree updating hook function
step2: place hook function into ima for test
step2: mv hook to process_measurement
step2: bug fix, almost finished