added flexibility in creating connectivity broadcast receiver