Split read_element() out of unpack().