start to implement branching but everything else still works