name change and rearrangement of some variables