js files in function