code for retrieving date + fooddata fix