Rewrote branch selection code in freeze function