Added reordering functionality