Simplyfying algorithm by generating amap of header to value for each transcation row instead of computing in advanced for all rows