fix error in selection logic
remove unnecessary copy
use v_select where possible