private Item executeDelete() {

		int deleteID = 0;
		boolean isValid = true;
		
		String content = inputList.get(0).getContent();

		if (!content.isEmpty()) {
			try {
				deleteID = Integer.parseInt(inputList.get(0).getContent()) - 1;
			} catch (Exception e) {
				isValid = false;
			}
		}

		if (!isLabel && deleteID < bufferTasksList.size()) {
			Task deleteTask;

			if (!tempList.isEmpty()) {
				deleteTask = (Task) tempList.get(deleteID);
				tempList = new LinkedList<Item>();
			} else {
				deleteTask = bufferTasksList.get(deleteID);
			}

			bufferTasksList.remove(deleteTask);
			deleteTask.editState(Operations.DELETE_OPERATION);

			logger.log(Level.INFO, "Task deleted");
			return deleteTask;
			
		} else if (isLabel && deleteID < bufferLabelsList.size()) {
			
			Label deleteLabel;
			
			deleteLabel = bufferLabelsList.remove(deleteID);
			deleteLabel.editState(Operations.DELETE_LABEL_OPERATION);
			
			logger.log(Level.INFO, "Label deleted");
			return deleteLabel;
			
		} else {
			isValid = false;
		}
		
		if (!isValid) {
			Task deleteTask = new Task(Operations.EMPTY_MESSAGE);

			deleteTask.editState(Operations.DELETE_ERROR);

			logger.log(Level.INFO, "Invalid task to be deleted");
			return deleteTask;
		}
		
		return null;
	}