correct typing of duration