fixed bugs with for loop and contact list