publish js functions