merge flipping changes
disabling flipping and leaf distribution improvement