externalise code to process survey answers into its own class