added very basic connectivity and deletion detection