move startTime before xhr call