new JS function goes in