add connection events listener