some hooks and branch-related calls