refactor min_delay method