Added function for intervals, changed to using setTimeout with an option to switch to intervals (useSetInterval)