changed time period as parameter