implemented branch expanding for only specific branches