             
             if(response.result.isSuccess) {
                 if let gamesInfoDict = response.result.value as? [String : AnyObject] {
-                    var games = [TwitchGame]()
-                    for gameRaw in gamesInfoDict["top"] as! [AnyObject] {
-                        if let topItemDict = gameRaw as? [String : AnyObject] {
-                            if let game = TwitchGame(dict: topItemDict) {
+                    if let gamesDicts = gamesInfoDict["top"] as? [[String : AnyObject]] {
+                        var games = [TwitchGame]()
+                        for gameRaw in gamesDicts {
+                            if let game = TwitchGame(dict: gameRaw) {
                                 games.append(game)
                             }
                         }
-                    }
-                    completionHandler(games: games, error: nil)
-                    return
-                }
-                else {
-                    let userInfo = [
-                        NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
-                        NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
-                        NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
-                    ]
-                    completionHandler(games: nil, error: NSError(domain: "TwitchAPI", code: 3, userInfo: userInfo))
-                    return
-                }
+                        completionHandler(games: games, error: nil)
+                        return
+                    }
+                }
+                let userInfo = [
+                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
+                    NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
+                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
+                ]
+                completionHandler(games: nil, error: NSError(domain: "TwitchAPI", code: 3, userInfo: userInfo))
+                return
             }
             else {
                 let userInfo = [

                return
            }
        }
        
    }
    
    static func getTopStreamsForGameWithOffset(game : String, offset : Int, limit : Int, completionHandler: (streams: [TwitchStream]?, error: NSError?) -> ()) {

            
            if(response.result.isSuccess) {
                if let gamesInfoDict = response.result.value as? [String : AnyObject] {
                    if let gamesDicts = gamesInfoDict["games"] as? [[String : AnyObject]] {
                        var games = [TwitchGame]()
                        for gameDict in gamesDicts {
                            if let game = TwitchGame(dict: gameDict) {
                                games.append(game)
                            }
                        }
                        completionHandler(games: games, error: nil)
                        return
                    }
                }
                let userInfo = [
                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
                    NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
                ]
                completionHandler(games: nil, error: NSError(domain: "TwitchAPI", code: 3, userInfo: userInfo))
                return
            }
            else {
                let userInfo = [
