Environmental effects in fretting