imo the bodies of these branches should get their own functions.