modified code:initially finish zfz sensor