added version increment and save on retract