added setinterval and clearinterval for auto run