added new JS function