Updated files with JS function