         process.rootFolder = collection.name
         process.image = image
         collection.processes.push(process)
-    callback null, collection
+      callback null, collection
 
   preprocessIiif = (collection, req, callback) ->
     url = req.body.images[0].value

  getExecutionType = (programType) ->
    switch programType
      when 'java'
        return 'java -Djava.awt.headless=true -jar'
      when 'coffeescript'
        return 'coffee'
      else

    collection.parameters = parameterHelper.matchParams(req.body.inputs, req.body.highlighter.segments,serviceInfo.parameters,folder,folder, "", req)
    if(ResultHelper.checkCollectionResultAvailable(collection))
      collection.result = ResultHelper.loadResult(collection)
      callback null, collection
    else
      #if results not available, load images and create processes
      images = ImageHelper.loadCollection(collection.name)
