Extracted the setDefaultLocation method from within the codeaddress method