refactoring of the 'reorder' widget