move countdown to js file