implements simultaneous sporking and saving state