learning how to branch