setting flag to true when modified