added new js functions