remove unnecessary connections