setInterval refactored, close #17