some optimization. problem of dates.