renamed js fn