updated controller and view for better date range filtering