changed return type of getcontacts to shared pointer