headers will be generated by transform method if they do not exist