storing contacts in array correctly