branch expanding implemented