add function javascript file