moved stream and address checking