added last_headers functionality