Added function to convert lists to vectors