Finished function.js