reordering scratches according to config