Added js function