Estimation and inference with weak instruments