dict.get used
scanner gain calculation implemented