this works in the contorller to read the file