changed the way in which circuits are saved so SR-latch is possible