Added ability to switch from records to vectors