Function back to js file