adding preliminary (broken) version of get_addresses.c