Modify to use headers and sequences when creating dict