add digitize for simulation coded by zhzhy