add js file with two functions finished