finish address function