Change .dat logic