added ability to rearrange rows