added nested array handling for extra data