removed interval js, added setTimeout