Implement to_vector