Completed code with contact building in the list