Updated save with switch instead of if