basics added for js functions