- remove while loop from main file.