Rename rateDocument
Save the output into a struct.