Optimisation on loop and selection of association list
Updated with last review