finished up to while lop