use Duration instead of float values