vec functions