If this is only being used for the rawData route, maybe just move that code into that function explictly?