             var albums = [Album]()
             do {
                 let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] ?? [:]
-                let albumsArray = json["albums"] as? [[String: Any]] ?? []
-                for albumDict in albumsArray {
+                let albumsArray = json["albums"] as? [String: Any] ?? [:]
+                let items = albumsArray["items"] as? [[String: Any]] ?? []
+                for albumDict in items {
                     let name = albumDict["name"] as? String ?? ""
                     
                     let album = Album(name: name, trackIDs: [], image: nil)

            var artists = [Artist]()
            do {
                let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] ?? [:]
                let artistsArray = json["artists"] as? [[String: Any]] ?? []
                for artistDict in artistsArray{
                    let name = artistDict["name"] as? String ?? ""
                    let artist = Artist(name: name, albumIDs: [], trackIDs: [])
                    artists.append(artist)

            var tracks = [Track]()
            do {
                let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] ?? [:]
                let tracksArray = json["tracks"] as? [String: Any] ?? [:]
                let items = tracksArray["items"] as? [[String: Any]] ?? []
                for trackDict in items {
                    let name = trackDict["name"] as? String ?? ""
                    let uri = trackDict["uri"] as? String ?? ""
                    let track = Track(name: name, albumID: "blah", artistID: "blah", image: nil, uri: uri)
