Using TryGetValue instead of ContainsKey and lookup