Add js functions