switching over to using interval rather than timeout