public boolean delete(String gNumber) {

		// no nodes
		if (top == null) {
			return false;
		}

		// 1 node and gNumbers match
		else if (top == tail && (top.getData().gNumber.equals(
				gNumber))) {
			top = tail = null;
			count = 0;
			return true;
		}

		// 1 node and no match
		else if (top == tail && !top.getData().gNumber.equals(
				gNumber)) {
			return false;
		}

		// checks match for top node
		else if (top.getData().gNumber.equals(gNumber)) {
			top = top.getNext();
			top.setPrevious(null);
			count--;
			return true;
		}

		// checks match for bottom node
		else if (tail.getData().gNumber.equals(gNumber)) {
			tail = tail.getPrevious();
			tail.setNext(null);
			count--;
			return true;
		}

		// searches for match in the middle
		else {
			Node current = top;

			// stops at the tail because the tail is already checked
			while (current.getNext() != tail) {
				String findGNum = current.getNext().getData().gNumber;

				// match found
				if (findGNum.equals(gNumber)) {
					current.setNext(current.getNext().getNext());
					current.getNext().setPrevious(current);
					count--;
					return true;
				}
				current = current.getNext();
			}
		}

		// no match found
		return false;
	}