Better UI for exchanging blocks up and down

I have developed a UI as shown below:

enter image description here

Now I want to add a functionality to this UI that if user wants to exchange positions of if and else if blocks, he must be able to do that.

One option could be an up and down arrow icon next to each if and else if, to move the blocks up and down. What could be other better options?