synchronized public Future<?> executeTask(Packet packet) {
		if(packet.packetType.equals("PUTCHUNK")) {
			executor.messageActiveTasks(packet);
			return executor.submit(new StoreChunkTask(packet.getChunk()));
		}
		else if (packet.packetType.equals("GETCHUNK")) {
			return executor.submit(new SendChunkTask(packet.getFileID(), packet.getChunkNo()));
		}
		else if (packet.packetType.equals("DELETE")) {
			return executor.submit(new HandleDeleteTask(packet.getFileID()));
		}
		else if (packet.packetType.equals("REMOVED")) {
			return executor.submit(new HandleRemoveTask(packet.getFileID(), packet.getChunkNo(), packet.getSenderAddress()));
		}
		else if (packet.packetType.equals("STORED")) {
			executor.messageActiveTasks(packet);
			return executor.submit(new HandleStoreTask(packet.getFileID(), packet.getChunkNo(), packet.getSenderAddress()));
		}
		else if (packet.packetType.equals("CHECKCHUNK")) {
			executor.messageActiveTasks(packet);
			return executor.submit(new CheckChunkAvailabilityTask());
		}
		else if (packet.packetType.equals("CHUNK")) {
			executor.messageActiveTasks(packet);
		}
		return null;
	}