revised maxDate and put .selct() before mapColumns()