updated to not cause CPU spikes when app is paused