moved field definition helper and added field definition type