everything working except for file read/write