removed alert, added interval function