fix algo? Order in which branches are processed is key.