solved issues with redo function