use baseDir var
shorten by 1 line by using map()