vector optimize