add branch handler