added js function