def get_payload_bits(payload_bytes):
	"""Return a list of bits from a list of bytes

	Keyword arguments:
	payload_bytes -- a list of bytes"""

	payload_bits = list()
	#convert each byte to a sequence of bits
	for byte in payload_bytes:
		temp = list()
		for i in range(8):
			temp.append(byte >> i & 1)
		#temp has the bits in reversed order
		payload_bits.extend(temp[::-1])
	return payload_bits