added file creation and serialization