todo now write and read from file