modified version of process_LCA_counts