adding function filter by date, and refresh table