handle a function that returns a dict and import date in correct place