added address error checking functionality