rearranged control flow