Added another while loop.