Dir ex5 added while loop