min duration as a parameter