arrange if blocks