Updated to change the duration flag to use the flag.Duration type