solved using 'WHIle'