public void updateQuantity(int cartItemId, int newQuantity) {
		
				try {
					
					//checks quantity and throws exception if quantity is <= 0
					if(newQuantity <=0){
						IlegalQuantityException ex = new IlegalQuantityException();
						ex.setMessage("invalid quanitity amount entered, 0 or less");
						throw ex;
					}
					
					for (int i = 0; i < itemsArray.size(); i++) {

						if (itemsArray.get(i).getId() == cartItemId) {
							itemsArray.get(i).setQuantity(newQuantity);
							lastAccessed = new Date();	
							return;
						}
					}
					
					//throws exception if no cart item of this ID is found
					CartItemNotFoundException ex = new CartItemNotFoundException();
					ex.setMessage("cart ID not found in list of cart items");
					throw ex;
				} catch (IlegalQuantityException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (CartItemNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}

	}