added a filter_data function to allow for data filtering, currently only works for all dates)