Rearranging the classes