change immediate for while true