Redo function implemented