adding to check for connection