trying to fix up file io