Refactored the code that joins the addresses in a single string