order of functions, change string to dates