fix some "writing" errors, and remove the last_time_changed, and fix the random value chooses for the domain