use JS in refersTo script