add interval to js