Changed window.setTimeout to use Timer