manage which client gets the vc
refactor
memleak fix and assertion
search