cleans up example, interval function called with correct this pointer