added basic js functions