script for work reordering