rearranged files according to class hierarchy