rearranged functions according to the stepdown rule