midrefactor till saveMove and restoreStateBeforeMove