added timer in js