fix the fdw to handle different params and date ranges