Use stod2 function also during extract function