adds while for clearinterval