replaces startDate and endDate with start_at and end_at