xhr formatting