add some js functions to external file