added a way to write and read a classData from file