huge improvements by rewriting ArrowLoop