added the ref in js processing