fix typehint
sleep a bit to avoid cpu spiking