rearrangement of functions