pass vector to the UI instead of raw pointer