reset on writing