private boolean verifyResponse(byte[] peerHandshake, boolean newPeer)
	{
		if(peerHandshake == null)
		{
			return false;
		}
		else if(peerHandshake.length != 68)
		{
			return false;
		}
		
		// check bit torrent protocol and info hash
		for (int i = 0; i < 48; i++)
		{
			// skip the 8 reserved bytes
			if (i > 19 && i < 28)
			{
				continue;
			}
			if (peerHandshake[i] != handshake[i])
			{
				return false;
			}
		}

		if (!newPeer)
		{
			// check the peerID
			byte[] peerIdArray = this.peerId.getBytes();
			for (int i = 48; i < peerHandshake.length; i++)
			{
				if (peerHandshake[i] != peerIdArray[i-48])
				{
					return false;
				}
			}
			return true;
		}
		else
		// this response checks out, set the new peers peer id to the peer id it sent in handshake
		{
			parsePeerId(peerHandshake);
			return true;
		}

	}