created function.js to try solving issues