Second attempt for part 1, handle file names as characters with new function