added legacy/imagesort script