public int run() {
		int nextScreen = BROWSE_PRODUCTS;

		reset();

		boolean finishedHere = false;
		while (!finishedHere) {
			updateCategories();
			updateSortBy();
			listProducts();

			draw();

			String option;
			try {
				option = getInput();

				if (option.equals("h")) {
					sortByHighest = true;
					curPage = 1;
				} else if (option.equals("a")) {
					sortByHighest = false;
					curPage = 1;
				} else if (option.equals("u")) {
					// find the parent category and redisplay hierarchy
					curCategory = getParentCategory(curCategory);
					curPage = 1;

				} else if (option.matches("c\\d+")) {
					// select the child category at the given index and redisplay hierarchy
					option = option.substring(1, option.length());
					int childCategory = Integer.parseInt(option);
					curCategory = childCategories.get(childCategory);
					curPage = 1;
				} else if (option.startsWith("p")) {
					option = option.substring(1, option.length());
					curPage = Integer.parseInt(option);
				} else if (option.startsWith("<")) {
					// go back to the customer screen
					nextScreen = CUSTOMER;
					finishedHere = true;
				} else {
					int auctionId = Integer.parseInt(option);
					session.setSelectedAuctionId(auctionId);

					nextScreen = AUCTION;
					finishedHere = true;
				}
			} catch (Exception e) {
				debug.println(e.toString());
				updateStatus("YOU DUN GOOFED");
				nextScreen = BROWSE_PRODUCTS;
			}
		}

		return nextScreen;
	}