added reset flag