fixed a bug that was causing duplication in data file