trying to fix too much work on main thread