     )
 
   removeCustomer: (customer) ->
-    customers.pop(customer)
+    @customers.filter((item) ->
+      item != customer
+    )
 
   calculateReputation: ->
     totalWorth = 0


  toString: ->
    "Customers: " + @customers.length +
    "\nRequest queue: " + @numberOfRequests() +
    "\nReputation: " + (@reputation * 100) + "%" +
    "\nAgents: " + @agents.join(", ")

      totalWorth += customer.worth
    if totalWorth != 0
      @reputation = totalRep / totalWorth

  calculateBudgetChange: ->
    budget = 0
    for agent in @agents
      budget -= agent.salary
    for customer in @customers
      budget += customer.worth
    budget

  constructor: ->
    @level = new Level
