function to edit the order of images in the moflix