avoid redoing unnecessary work