fixed segmentation fault due to improper declaration of the address struct