setinterval does not work in IOS. Use settimeout