replace double by float
replace implementation of dst