replace interval with setTimeout to clean up

help readability on #240