added get fields functionality