implemented nested hash data structure for survey creation