Change duration to float