Added code to update addresses on clicking Submit button