figure out connection preamble and header