With doubles and saving of state