moved getDuration