updated extract routine to generate the data as a module.