Rearrangement of functions