moved logic to Address class