seems correct now

hasn’t adapt to the fstream