use a timer to run in browser