Simplify the startup loop

only read xs on start, do not loop