Why rejections can strengthen friendship