You guys need to change this. Extremely complicated. Why do you even need to put a while loop?
Forget it. Forget the while loop. Just get the name, and number and push to the array of contact_list. That's all you need to do. Your code don't even work like this. Just keep it simple and when needed, you can kae it complex. Don't complicate things in the learning curve.