Few js functions