everything looks in order now except for saving state,