modified data class

added some functions in to create data files. untested!