used self headers property instead header->toArray