how to convert vector