redo, undo実装
refactor