private TrackingResult[] GetSingle(string keyword, string type, int[] selectedSteps) { var tracker = tracking.Resolve(keyword, type); TrackingResult[] results = new TrackingResult[selectedSteps.Length]; for (int i = 0; i < selectedSteps.Length; i++) { var step = selectedSteps[i]; var result = new TrackingResult { Average = tracker.CalculateAverageRating(step), TotalMessages = tracker.Count(lastHours: step), Hours = step }; results[i] = result; } return(results.ToArray()); }