               pageToken: nextPageToken
             retrievePageOfFiles request, result
           else
-            callback null, result
+            callback null, files
         )
-      initialRequest = gapi.client.drive.files.list 'q': filter
-
+      initialRequest = gapi.client.drive.files.list q: filter
       retrievePageOfFiles initialRequest, []
 
   # ####################################################################

  fetch: promisify ({rootNodeId}, callback)->
    filter = "'#{rootNodeId}' in parents" # only finds files *directly* in this folder (not in subfolders)
    @getFiles(filter).then (files) =>
      sphere = @toSphere rootNodeId, files
      callback null, sphere

  toSphere: (rootNodeId, files) =>
    sphere = new Sphere


  getFiles: promisify (filter, callback) ->
    gapi.client.load 'drive', 'v3', ->
      retrievePageOfFiles = (request, files) ->
        request.execute((resp) ->
          files = files.concat resp.files
          nextPageToken = resp.nextPageToken
          if nextPageToken
            request = gapi.client.drive.files.list
