adding seperate js file so html doesn't become large