switched over to setTimeout instead of setInterval