refactor
use reference in branching instruction generation