added missing parts to catch time to first byte