verify_branch.sh condense into function