Updated JS for looper