added timer javascript code