added conversion function to vector