updated code to get list of all the contcts