public void removeStock() throws RemoteException, InterruptedException
	{

		Random rand = new Random();
		boolean bought;
		int numberOfItems;
		int itemID;
		int itemQuantity;
		
		numberOfItems = getNumberOfItems();
		
		while(true){
			itemQuantity = rand.nextInt(20) + 1;
			itemID = rand.nextInt(numberOfItems) + 1;
			bought = false;
			while (!bought && itemQuantity != 0)
			{
				try {
					System.out.println(this.clientID + " is buying an item");
					bought = currentServer.updateItem(this.clientID, requestNo, itemID, -itemQuantity, ClientServer.CLIENT);
					if (!bought) { 
						itemQuantity = itemQuantity - 1;
					}
				}
				catch (Exception e)
				{
					getServer(ICoreServer.host);
				}
			}
			
			//If by the end we managed to buy what we wanted, increment the request number
			if (bought)
			{
				requestNo++;
				System.out.println("Bought " + itemQuantity + " of "+ currentServer.getItem(itemID).getName());
			}

			if (itemQuantity == 0)
			{
				System.out.println("There was no stock for the given item: " + itemID);
			}

			Thread.sleep((rand.nextInt(5)+1)*1000);
		}
	}