better time period validation