add functions getFields, trim, and sortData to data prototype