HashMap preprocessing or one time shot