         configuration = option
         project = null
 
-        buildTypeRE = /^\s*of (.*?) of (.*)/i
+        buildTypeRE = /^\s*of (.*?) of (.*) (\d*)/i
 
         buildTypeMatches = option.match buildTypeRE
         if buildTypeMatches?
           configuration = buildTypeMatches[1]
           project = buildTypeMatches[2]
+          amount = parseInt(buildTypeMatches[3])
+          console.log amount
         else
-          buildTypeRE = /^\s*of (.*)/i
+          buildTypeRE = /^\s*of (.*) (\d*)/i
           buildTypeMatches = option.match buildTypeRE
-          if buildTypeMatches
+          if buildTypeMatches?
             configuration = buildTypeMatches[1]
+            amount = parseInt(buildTypeMatches[2])
             project = null
-
-        getBuilds msg, project, configuration, (err, msg, builds) ->
+          else
+            amount = 5
+            buildTypeRE = /^\s*of (.*?) of (.*)/i
+
+            buildTypeMatches = option.match buildTypeRE
+            if buildTypeMatches?
+              configuration = buildTypeMatches[1]
+              project = buildTypeMatches[2]
+            else
+              buildTypeRE = /^\s*of (.*)/i
+              buildTypeMatches = option.match buildTypeRE
+              if buildTypeMatches?
+                configuration = buildTypeMatches[1]
+                project = null
+
+
+        getBuilds msg, project, configuration, amount, (err, msg, builds) ->
           if not builds
             msg.send "Could not find builds for #{option}"
             return

          if err
            msg.send "Fail! Something went wrong. Couldn't start the build for some reason"
          else
            msg.send "Dropped a build in the queue for #{buildName}. Run `tc list builds #{buildName}` to check the status"

  robot.respond /tc list (projects|buildTypes|builds) ?(.*)?/i, (msg) ->
    type = msg.match[1]

        buildTypes = JSON.parse(body).buildType unless err
        callback err, msg, buildTypes

  getBuilds = (msg, project, configuration, amount, callback) ->
    projectSegment = ''
    if project?
      projectSegment = "/projects/name:#{encodeURIComponent(project)}"
