added data files and code to create flats for states